package com.chenfan.mcn.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chenfan.mcn.extension.log.FieldDesc;
import com.chenfan.mcn.constant.DictTypeCst;
import com.chenfan.common.extension.validation.groups.Modify;
import com.chenfan.mcn.model.base.BaseSaveEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;

/**
 * @author tangwei
 * Date:     2021/1/26 20:11
 * Description: 收入合同执行单-计算分成
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("calculation_devided")
public class CalculationDevided extends BaseSaveEntity {

    private static final long serialVersionUID = 6383041931390561308L;

    /**
     * 执行单主键id
     */
    private Long excutionOrderId;

    /**
     * 执行单编号
     */
    private String excutionOrderCode;

    /**
     * 实际报价
     */
    @FieldDesc(value = "实际报价（元）")
    private BigDecimal realAmount;

    /**
     * 客户固定优惠比例（%）
     */
    @FieldDesc(value = "客户固定优惠比例（%）")
    @TableField(value = "customer_rabate_rate")
    private BigDecimal customerRebateRate;

    /**
     * 对应客户返点金额
     */
    @FieldDesc(value = "对应客户返点金额（元）")
    private BigDecimal customerRebateAmount;

    /**
     * 内容报价返点比例（%）
     */
    @FieldDesc(value = "内容报价返点比例（%）")
    private BigDecimal aeCustomerRabateRate;

    /**
     * 内容报价返点金额
     */
    @FieldDesc(value = "内容报价返点金额（元）")
    private BigDecimal aeCustomerRabateAmount;

    /**
     * 系统计算分成金额
     */
    @FieldDesc(value = "系统计算分成金额（元）")
    private BigDecimal sysDevidedAmount;

    /**
     * AE确认分成金额
     */
    @FieldDesc(value = "AE确认分成金额（元）")
    private BigDecimal aeDevidedAmount;

    /**
     * 财务确认分成金额
     */
    @FieldDesc(value = "财务确认分成金额（元）")
    private BigDecimal financeDevidedAmount;

    /**
     * 系统计算文建税
     */
    @FieldDesc(value = "系统计算文建税（元）")
    private BigDecimal sysCulturalTax;

    /**
     * AE确认文建税
     */
    @FieldDesc(value = "AE确认文建税（元）")
    private BigDecimal aeCulturalTax;

    /**
     * 财务确认文建税
     */
    @FieldDesc(value = "财务确认文建税（元）")
    private BigDecimal financeCulturalTax;

    /**
     * 本单固定到手价
     */
    @FieldDesc(value = "本单固定到手价（元）")
    private BigDecimal handPrice;

    /**
     * 年度优惠返点比例
     */
    private BigDecimal yearRebateRate;

    /**
     * AE备注
     */
    private String remark;

    /**
     * 附件-JSON字符串
     */
    private String attachmentFile;

    /**
     * AE确认应收金额（元）
     */
    @FieldDesc(value = "AE确认应收金额（元）")
    private BigDecimal aeReceivableAmount;

    /**
     * 财务确认应收金额（元）
     */
    @FieldDesc(value = "财务确认应收金额（元）")
    private BigDecimal amountReceivable;

    /**
     * 打款截图
     */
    private String screenshotPayment;

    /**
     * 结算方式
     */
    @NotBlank(message = "结算方式不能为空", groups = {Modify.class})
    @FieldDesc(value = "结算方式", dictType = DictTypeCst.SETTLEMENT_METHOD)
    private String settlementMethod;
    /**
     * 结算形式(0-线上结算、1-线下结算)
     */
    @FieldDesc(value = "结算形式", replace = {"线上结算_0","线下结算_1"})
    private Integer settlementForm;

    /**
     * 本单实际优惠比例（%）
     */
    @FieldDesc(value = "本单实际优惠比例")
    private BigDecimal actualDiscountRatio;

    /**
     * 财务备注
     */
    @FieldDesc(value = "财务备注")
    private String financeDevidedRemark;
}
